def merge_bin_files(file1_path, file2_path, output_path):
    # 读取第一个二进制文件
    with open(file1_path, 'rb') as f1:
        data1 = f1.read()
    
    # 读取第二个二进制文件
    with open(file2_path, 'rb') as f2:
        data2 = f2.read()
    
    # 合并文件内容
    merged_data = data1 + data2
    
    # 写入新文件
    with open(output_path, 'wb') as out_file:
        out_file.write(merged_data)

if __name__ == "__main__":
    # 示例用法（根据实际情况修改路径）
    merge_bin_files(
        '500_black.bin',    # 第一个输入文件路径
        '20250618_140217.bin',    # 第二个输入文件路径 
        'merged.bin'    # 合并后输出文件路径
    )